{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "import sys,copy,os,inspect\n",
    "if hasattr(sys.modules[__name__], '__file__'):\n",
    "    _file_name = __file__\n",
    "else:\n",
    "    _file_name = inspect.getfile(inspect.currentframe())\n",
    "CURRENT_FILE_PATH = os.path.dirname(_file_name)\n",
    "sys.path.append(os.getcwd()+\"/./neuronVis\")\n",
    "\n",
    "import sys,os\n",
    "from skimage import measure,io\n",
    "import IONData,Scene\n",
    "import nrrd\n",
    "from sklearn.cluster import KMeans\n",
    "import numpy as np\n",
    "import trimesh\n",
    "import matplotlib.pyplot as plt\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "import shutil\n",
    "neurons=Scene.scene2List(\"./resource/total_neuron.nv\")\n",
    "# iondata = IONData.IONData()\n",
    "file_handle=open('./resource/total_neuron.txt',mode='w')\n",
    "# for neuron in neurons:\n",
    "#     file_handle.writelines('D:/project/python/neuron-vis/resource/swc/'+neuron['sampleid']+\"/\"+neuron['name']+'\\n')\n",
    "# file_handle.close()\n",
    "for neuron in neurons:\n",
    "    path='D:/project/python/neuron-vis/resource/swc/'+neuron['sampleid']+\"/\"+neuron['name']+\"isoprojection.json\"\n",
    "    shutil.move(path, 'D:/project/python/neuron-vis/resource/swc/songwei/'+neuron['sampleid']+\"_\"+neuron['name']+\"isoprojection.json\")\n",
    "    \n",
    "    # iondata\n",
    "    # iondata.getNeuronTreeByID(neuron['sampleid'],neuron['name'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "neuronVis",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
